package com.amap.map3d.demo

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.amap.api.maps.AMap
import com.amap.api.maps.MapView

class MainActivity2 : AppCompatActivity() {
    private lateinit var mapView: MapView

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main2)
        mapView = findViewById(R.id.mapview)
        mapView.map.mapType = AMap.MAP_TYPE_SATELLITE
        mapView.map.setOnMapLoadedListener {
            mapView.map.showBuildings(true)
        }
        mapView.onCreate(savedInstanceState)
    }

    override fun onPause() {
        super.onPause()
        mapView.onPause()
    }

    override fun onDestroy() {
        super.onDestroy()
        mapView.onDestroy()
    }

    override fun onResume() {
        super.onResume()
        mapView.onResume()
    }
}